package ru.st.selenium.applogicImp;

import java.util.List;

import ru.st.selenium.applogicTop.TypesObjectHelper;
import ru.st.selenium.model.Dictionary;
import ru.st.selenium.model.TypesTable;
import ru.st.selenium.model.TypesTask;

public class TypesObjectHelperImp extends DriverBasedHelper implements TypesObjectHelper {

	public TypesObjectHelperImp(ApplicationManagerImp manager) {
		super(manager.getWebDriver());
	}

	// ТИПЫ ТАБЛИЦ
	@Override
	public void createTypesTable(TypesTable typestable) {
		pages.User.ensurePageLoaded().GoToTables()
				.gotoFremObjectPage().ensurePageLoaded().AddTypesObject()
				.setNameObject(typestable.getTypesObjectName());
	}
	
	// Проверка - Создание объекта - Тип таблицы
	@Override
	public void verifyCreateObject() {
		pages.typesObjectPage.ensurePageLoaded().verifyCreateObject()
		.gotoTopFrem();
	}

	@Override
	public void deleteTypesTable(TypesTable typestable) {
		// TODO Auto-generated method stub

	}
	
	@Override
	public List<TypesTable> search(String title) {
		// TODO Auto-generated method stub
		return null;
	}
	
	
	// ТИПЫ ЗАДАЧ
	@Override
	public void createTypesTask(TypesTask typestask) {
		pages.User.ensurePageLoaded().GoToTasktypelist()
				.gotoFremObjectPage().ensurePageLoaded().AddTypesObject()
				.setNameObject(typestask.getTypesTaskName());
	}
	

	@Override
	public void deleteTypesTask(TypesTask typestask) {
		// TODO Auto-generated method stub
		
	}

	// СПРАВОЧНИКИ
	@Override
	public void createDictionary(Dictionary dictionary) {
		pages.User.ensurePageLoaded().GoToDictionary()
				.gotoFremObjectPage().ensurePageLoaded().AddTypesObject()
				.setNameObject(dictionary.getDictionaryName());
	}
	
	
	
}
